import requestApi from '../requestApi'

export default function (props, data, action) {
    switch (action) {
        case 'add' :
            props.table.addRow(window.bodyCode, data[window.bodyCode]);
            let reqData = {
                head: data[window.bodyCode]
            }
            console.log(111, data);
            requestApi.add({
                data: reqData,
                success: (data) => {
                    console.log(333, data)
                }
            });
            break;
        case 'edit' :

            break;
    }
}